# -*- coding: utf-8 -*-

# Scrapy settings for sanzhisongshu project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
#     https://doc.scrapy.org/en/latest/topics/settings.html
#     https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
#     https://doc.scrapy.org/en/latest/topics/spider-middleware.html

BOT_NAME = 'sanzhisongshu'

SPIDER_MODULES = ['sanzhisongshu.spiders']
NEWSPIDER_MODULE = 'sanzhisongshu.spiders'

# Crawl responsibly by identifying yourself (and your website) on the user-agent
# USER_AGENT = 'sanzhisongshu (+http://www.yourdomain.com)'

# Obey robots.txt rules
ROBOTSTXT_OBEY = False

# Configure maximum concurrent requests performed by Scrapy (default: 16)
# CONCURRENT_REQUESTS = 32

# Configure a delay for requests for the same website (default: 0)
# See https://doc.scrapy.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
# DOWNLOAD_DELAY = 3
# The download delay setting will honor only one of:
# CONCURRENT_REQUESTS_PER_DOMAIN = 16
# CONCURRENT_REQUESTS_PER_IP = 16

# Disable cookies (enabled by default)
COOKIES_ENABLED = False

# Disable Telnet Console (enabled by default)
# TELNETCONSOLE_ENABLED = False

# Override the default request headers:
DEFAULT_REQUEST_HEADERS = {
    'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
    'accept-language': 'zh-CN,zh;q=0.9',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36',
    'cookie': 'cna=EGDqFFxEZG4CAXt4eCKgjzeM; lid=%E6%83%B3%E4%B9%B0%E5%B0%B1%E4%B9%B0%E7%82%B9%E5%95%A5%E5%90%A7; otherx=e%3D1%26p%3D*%26s%3D0%26c%3D0%26f%3D0%26g%3D0%26t%3D0; x=__ll%3D-1%26_ato%3D0; hng=CN%7Czh-CN%7CCNY%7C156; t=6fc2dc268fbbced03e2d979e70bd8e6a; tracknick=%5Cu60F3%5Cu4E70%5Cu5C31%5Cu4E70%5Cu70B9%5Cu5565%5Cu5427; lgc=%5Cu60F3%5Cu4E70%5Cu5C31%5Cu4E70%5Cu70B9%5Cu5565%5Cu5427; _tb_token_=533355e83b9e1; cookie2=1033e89dc871b8b7432efd5a23d03694; dnk=%5Cu60F3%5Cu4E70%5Cu5C31%5Cu4E70%5Cu70B9%5Cu5565%5Cu5427; uc1=cookie14=UoTZ5OgDe9gNIQ%3D%3D&lng=zh_CN&cookie16=VT5L2FSpNgq6fDudInPRgavC%2BQ%3D%3D&existShop=false&cookie21=W5iHLLyFeYZ1WM9hVnmS&tag=8&cookie15=U%2BGCWk%2F75gdr5Q%3D%3D&pas=0; uc3=vt3=F8dByEzd%2FcIUQHCYjkE%3D&id2=UU6ie%2Br%2FgQgm6Q%3D%3D&nk2=rOFLWwylzr6l7DY9Sk4%3D&lg2=W5iHLLyFOGW7aA%3D%3D; _l_g_=Ug%3D%3D; unb=2637590415; cookie1=BYToU%2BlqCq95nt4EV27nVN%2BK7SefRgWLv%2BA%2BFy%2B805w%3D; login=true; cookie17=UU6ie%2Br%2FgQgm6Q%3D%3D; _nk_=%5Cu60F3%5Cu4E70%5Cu5C31%5Cu4E70%5Cu70B9%5Cu5565%5Cu5427; sg=%E5%90%A752; csg=504d5d46; enc=WfjB21uq2%2F7sj08CAzcHRuRuPqfFoQdKJLc8uJhGMAteJcKVzAP%2FpWW3pSRWYk4v929hezf7Um4pC%2BoRvIYFfg%3D%3D; cq=ccp%3D0; swfstore=8142; pnm_cku822=098%23E1hvcvvUvbpvjQCkvvvvvjiPRLs9Qj1HPsdW1jthPmPpQj1hRFF91jE8R2qysjR5vpvhvvCCB2yCvvpvvhCv2QhvCPMMvvvCvpvVvvBvpvvvkphvC9hvpyPwA8yCvv9vvhhILV075dyCvm9vvhCvvvvvvvvvByOvvUvFvvCVB9vv9LvvvhXVvvmCjvvvByOvvUhwmphvLUHA3IOa9Cka%2BfvsxI2UjLeARFxjKOmAdBuKNB3rl8g7rEgDNrCl51IOe5an6n9wVCOqb64B9Cka%2BfvsxI2WjLeARFxjKOm65d8rwoQ%3D; whl=-1%260%260%260; isg=BH9_C9fJH9muYBvGob59X4G0DlMJZNMG3jFQiBFMHy51IJ-iGTcaVmk6YrB7fqt-',
}

# Enable or disable spider middlewares
# See https://doc.scrapy.org/en/latest/topics/spider-middleware.html
# SPIDER_MIDDLEWARES = {
#    'sanzhisongshu.middlewares.SanzhisongshuSpiderMiddleware': 543,
# }

# Enable or disable downloader middlewares
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
# DOWNLOADER_MIDDLEWARES = {
#    'sanzhisongshu.middlewares.SanzhisongshuDownloaderMiddleware': 543,
# }

# Enable or disable extensions
# See https://doc.scrapy.org/en/latest/topics/extensions.html
# EXTENSIONS = {
#    'scrapy.extensions.telnet.TelnetConsole': None,
# }

# Configure item pipelines
# See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
# ITEM_PIPELINES = {
#    'sanzhisongshu.pipelines.SanzhisongshuPipeline': 300,
# }

# Enable and configure the AutoThrottle extension (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/autothrottle.html
# AUTOTHROTTLE_ENABLED = True
# The initial download delay
# AUTOTHROTTLE_START_DELAY = 5
# The maximum download delay to be set in case of high latencies
# AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
# AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
# AUTOTHROTTLE_DEBUG = False

# Enable and configure HTTP caching (disabled by default)
# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
# HTTPCACHE_ENABLED = True
# HTTPCACHE_EXPIRATION_SECS = 0
# HTTPCACHE_DIR = 'httpcache'
# HTTPCACHE_IGNORE_HTTP_CODES = []
# HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
